import org.w3c.dom.ls.LSOutput;

class OuterClass {
    public int data1  = 1;
    public static int  data11 = 10;

    class InterClass {
        public int data2 = 2;

        public void func() {
            System.out.println(data1);
            System.out.println(data11);
            funcOuter();
        }


        public InterClass() {
            System.out.println("我是实例内部类的构造方法");
        }
        public void funcInter() {
            System.out.println("我是实例内部类的成员方法");
        }
    }
    public void funcOuter() {
        System.out.println("我是外部类的成员方法");
    }

}


public class Test2 {
    public static void main(String[] args) {
       /* OuterClass out = new OuterClass();
        OuterClass.InterClass interClass = out.new InterClass();*/
        OuterClass.InterClass interClass = new OuterClass().new InterClass();
        interClass.funcInter();
        System.out.println(interClass.data2);

    }
}
